/**
 * 
 */
package com.secfound.soccer.shared.db;

import java.io.Serializable;
import java.util.Date;

import com.google.code.twig.annotation.Id;

/**
 * Placed Bets
 * @author alfonso.ayala
 *
 */
public class Bet implements Serializable{

	@Id
	String id;
	String aTeam;
	String bTeam;
	String aScore;
	String bScore;
	String startTime;
	String createdTime;
	Date created;
	Date closed;
	boolean success;
	int points;
	String status;
	String challenger;
	String betCompetition;
	private static final long serialVersionUID = -5020154541637221546L;
	
	public String getBetCompetition() {
		return betCompetition;
	}
	public void setBetCompetition(String betCompetition) {
		this.betCompetition = betCompetition;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	public String getaTeam() {
		return aTeam;
	}
	public void setaTeam(String aTeam) {
		this.aTeam = aTeam;
	}
	public String getbTeam() {
		return bTeam;
	}
	public void setbTeam(String bTeam) {
		this.bTeam = bTeam;
	}
	public String getaScore() {
		return aScore;
	}
	public void setaScore(String aScore) {
		this.aScore = aScore;
	}
	public String getbScore() {
		return bScore;
	}
	public void setbScore(String bScore) {
		this.bScore = bScore;
	}
	public String getChallenger() {
		return challenger;
	}
	public void setChallenger(String challenger) {
		this.challenger = challenger;
	}
	public Bet(){
		
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(String createdTime) {
		this.createdTime = createdTime;
	}
	public Bet(String challengerEmail, String aTeam, String aScore, String bTeam,
			String bScore, String startTime, String currentTime) {
		super();
		this.challenger = challengerEmail;
		this.aTeam = aTeam;
		this.aScore = aScore;
		this.bTeam = bTeam;
		this.bScore = bScore;
		this.startTime=startTime;
		this.createdTime=currentTime;
		this.id= challengerEmail + "|"+ currentTime + "|" + aTeam +"|"+ aScore+ "|"+ bTeam +"|"+ bScore+"|"+ startTime;
	}
	public String toString(){
		return challenger +"|"+ aTeam +" "+ aScore+ " "+ bTeam +" "+ bScore+" "+ startTime;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public int getPoints() {
		return points;
	}
	public void setPoints(int points) {
		this.points = points;
	}
}
